<?php
$store = Mage::app()->getStore();
$code  = $store->getCode();
    $_enable = Mage::getStoreConfig('slidermenu/slider/slider_enabled', $code);
    $_option_auto = Mage::getStoreConfig('slidermenu/slider/option_auto', $code);
    $_option_pause = Mage::getStoreConfig('slidermenu/slider/option_pause', $code);
    $_option_autostart = Mage::getStoreConfig('slidermenu/slider/option_autostart', $code);
    $_option_autohover = Mage::getStoreConfig('slidermenu/slider/option_autohover', $code);
    $_option_speed = Mage::getStoreConfig('slidermenu/slider/option_speed', $code);
    $_option_auto = ($_option_auto)?'true':'false';
    $_option_autostart = ($_option_autostart)?'true':'false';
    $_option_autohover = ($_option_autohover)?'true':'false';
    $_rs_option_delay = Mage::getStoreConfig('slidermenu/slider/rs_option_delay', $code);
    $_rs_option_onhoverstop = Mage::getStoreConfig('slidermenu/slider/rs_option_onhoverstop', $code);
    $_rs_option_onhoverstop = ($_rs_option_onhoverstop)?'on':'off';
    if($_enable == 1){
        $_blockid = '';
        $_type = Mage::getStoreConfig('slidermenu/slider/slider_type', $code);
        if($_type == 0){
            $_blockid = Mage::getStoreConfig('slidermenu/slider/cms_blockid1', $code);
			if(!$_blockid){
				$_blockid = 'home_slider_1';
			}
			echo $this->getLayout()->createBlock('cms/block')->setBlockId($_blockid)->toHtml();
?>
                <script>
                    jQuery(function($) {
                        $('.bxslider').bxSlider({auto: <?php echo $_option_auto; ?>, autoStart: <?php echo $_option_autostart; ?>, autoHover: <?php echo $_option_autohover; ?>, pause: <?php echo $_option_pause; ?>, mode:'fade', speed:<?php echo $_option_speed; ?>});
                    });
                </script>
<?php
        } else if($_type == 1){
            $_blockid = Mage::getStoreConfig('slidermenu/slider/cms_blockid2', $code);
			if(!$_blockid){
				$_blockid = 'home_slider_2';
			}
			echo $this->getLayout()->createBlock('cms/block')->setBlockId($_blockid)->toHtml();
?>
                <script>
                    jQuery(function($) {
                        $('.bxslider').bxSlider({auto: <?php echo $_option_auto; ?>, autoStart: <?php echo $_option_autostart; ?>, autoHover: <?php echo $_option_autohover; ?>, pause: <?php echo $_option_pause; ?>, mode:'fade', speed:<?php echo $_option_speed; ?>, contentEffect: true});
                    });
                </script>
<?php
        } else if($_type == 2){
            $_blockid = Mage::getStoreConfig('slidermenu/slider/cms_blockid3', $code);
			if(!$_blockid){
				$_blockid = 'home_slider_3';
			}
			echo $this->getLayout()->createBlock('cms/block')->setBlockId($_blockid)->toHtml();
?>
                <script>
                    jQuery(function($) {
                        $('.bxslider').bxSlider({auto: <?php echo $_option_auto; ?>, autoStart: <?php echo $_option_autostart; ?>, autoHover: <?php echo $_option_autohover; ?>, pause: <?php echo $_option_pause; ?>, mode:'fade', speed:<?php echo $_option_speed; ?>});
                    });
                </script>
<?php
        } else if($_type == 3){
            $_blockid = Mage::getStoreConfig('slidermenu/slider/cms_blockid4', $code);
			if(!$_blockid){
				$_blockid = 'home_slider_4';
			}
			echo $this->getLayout()->createBlock('cms/block')->setBlockId($_blockid)->toHtml();
?>
            <script type="text/javascript" src="<?php echo $this->getSkinUrl('VerticalShowcaseSlider/slider.js');?>"></script>

                <script>
                    jQuery(function($) {
                        VSSlider.init();
                    });
                </script>
<?php
        } else if($_type == 4){
            $_blockid = Mage::getStoreConfig('slidermenu/slider/cms_blockid5', $code);
            if(!$_blockid){
                $_blockid = 'home_slider_5';
            }
?>
            <div class="fullscreen-container">
                <div class="fullscreenbanner">
<?php
                echo $this->getLayout()->createBlock('cms/block')->setBlockId($_blockid)->toHtml();
?>
                </div>
            </div>
            <script>
                jQuery(function($) {
                    if ($.fn.cssOriginal!=undefined)
                    $.fn.css = $.fn.cssOriginal;

                    $('.fullscreenbanner').revolution(
                        {
                            delay:<?php echo $_rs_option_delay; ?>,
                            startwidth:1170,
                            startheight:600,

                            onHoverStop:"<?php echo $_rs_option_onhoverstop; ?>",                        // Stop Banner Timet at Hover on Slide on/off

                            thumbWidth:100,                            // Thumb With and Height and Amount (only if navigation Tyope set to thumb !)
                            thumbHeight:50,
                            thumbAmount:3,

                            hideThumbs:0,
                            navigationType:"bullet",                // bullet, thumb, none
                            navigationArrows:"solo",                // nexttobullets, solo (old name verticalcentered), none

                            navigationStyle:"round",                // round,square,navbar,round-old,square-old,navbar-old, or any from the list in the docu (choose between 50+ different item), custom


                            navigationHAlign:"center",                // Vertical Align top,center,bottom
                            navigationVAlign:"bottom",                    // Horizontal Align left,center,right
                            navigationHOffset:0,
                            navigationVOffset:55,

                            soloArrowLeftHalign:"left",
                            soloArrowLeftValign:"center",
                            soloArrowLeftHOffset:20,
                            soloArrowLeftVOffset:0,

                            soloArrowRightHalign:"right",
                            soloArrowRightValign:"center",
                            soloArrowRightHOffset:20,
                            soloArrowRightVOffset:0,

                            touchenabled:"on",                        // Enable Swipe Function : on/off


                            stopAtSlide:-1,                            // Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
                            stopAfterLoops:-1,                        // Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic

                            hideCaptionAtLimit:0,                    // It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
                            hideAllCaptionAtLilmit:0,                // Hide all The Captions if Width of Browser is less then this value
                            hideSliderAtLimit:0,                    // Hide the whole slider, and stop also functions if Width of Browser is less than this value


                            fullWidth:"on",                            // Same time only Enable FullScreen of FullWidth !!
                            fullScreen:"on",                        // Same time only Enable FullScreen of FullWidth !!

                            shadow:0                                //0 = no Shadow, 1,2,3 = 3 Different Art of Shadows -  (No Shadow in Fullwidth Version !)

                        });
                });
            </script>
<?php
        }
        
    }
?>